<?php

	class PlatformYoka extends PlatformBase{
		function index_prepare(){
			if (!empty($_REQUEST['top_session'])){
				$_REQUEST['xn_sig_user'] = $_REQUEST['top_session'];
			}
			if (empty($_REQUEST['xn_sig_session_key'])){
				if (!empty($_REQUEST['top_params'])){
					$_REQUEST['xn_sig_session_key'] = base64_encode($_SERVER['QUERY_STRING']);
				}
			}else {
				$k = base64_decode($_REQUEST['xn_sig_session_key']);
				parse_str($k,$arr);
				$_REQUEST['top_params'] = $_GET['top_params'] = $arr['top_params'];
				$_REQUEST['top_session'] = $_GET['top_session'] = $arr['top_session'];
				$_REQUEST['top_sign'] = $_GET['top_sign'] = $arr['top_sign'];
				$_REQUEST['appkey'] = $_GET['appkey'] = $arr['appkey'];			
			}
		}
	}
